#include "BoardSelector.h" 

BoardSelector::BoardSelector()
{

}

BoardSelector::~BoardSelector()
{

}

void BoardSelector::RegisterObserver(BoardSelectorObserver *observer)
{
	observers.push_back(observer);
}

/*
 void BoardSelector::UnregisterObserver(BoardSelectorObserver *observer)
 {
 std::list<BoardSelectorObserver*>::iterator it;

 for(it = observers.begin(); it != observers.end(); ++it)
 {
 if ( (*it) == observer )
 {
 observers.erase(it);
 break;
 }
 }
 }
 */

void BoardSelector::NotifySelectedMap()
{
	std::list<BoardSelectorObserver*>::iterator it;

	for (it = observers.begin(); it != observers.end(); ++it)
	{
		(*it)->SelectedMap();
	}
}

void BoardSelector::NotifyCancelled()
{
	std::list<BoardSelectorObserver*>::iterator it;

	for (it = observers.begin(); it != observers.end(); ++it)
	{
		(*it)->CancelledMap();
	}
}
